package com.ruoyi.stock.service.impl;

import com.ruoyi.stock.domain.WarehouseInInfo;
import com.ruoyi.stock.mapper.WarehouseInInfoMapper;
import com.ruoyi.stock.service.IWarehouseInInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 入库清单Service业务层处理
 *
 * @author YwaiX
 * @date 2024-10-29
 */
@Service
public class WarehouseInInfoServiceImpl implements IWarehouseInInfoService {
    @Autowired
    private WarehouseInInfoMapper warehouseInInfoMapper;

    /**
     * 查询入库清单
     *
     * @param id 入库清单主键
     * @return 入库清单
     */
    @Override
    public WarehouseInInfo selectWarehouseInInfoById(Long id) {
        return warehouseInInfoMapper.selectWarehouseInInfoById(id);
    }

    /**
     * 查询入库清单列表
     *
     * @param warehouseInId 入库清单
     * @return 入库清单
     */
    @Override
    public List<WarehouseInInfo> selectWarehouseInInfo(Integer warehouseInId) {
        return warehouseInInfoMapper.selectWarehouseInInfo(warehouseInId);
    }


    @Override
    public List<WarehouseInInfo> selectWarehouseInInfoList(WarehouseInInfo warehouseInInfo) {
        return warehouseInInfoMapper.selectWarehouseInInfoList(warehouseInInfo);
    }

    /**
     * 新增入库清单
     *
     * @param warehouseInInfo 入库清单
     * @return 结果
     */
    @Override
    public int insertWarehouseInInfo(WarehouseInInfo warehouseInInfo) {
        return warehouseInInfoMapper.insertWarehouseInInfo(warehouseInInfo);
    }

    /**
     * 修改入库清单
     *
     * @param warehouseInInfo 入库清单
     * @return 结果
     */
    @Override
    public int updateWarehouseInInfo(WarehouseInInfo warehouseInInfo) {
        return warehouseInInfoMapper.updateWarehouseInInfo(warehouseInInfo);
    }

    /**
     * 批量删除入库清单
     *
     * @param ids 需要删除的入库清单主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseInInfoByIds(Long[] ids) {
        return warehouseInInfoMapper.deleteWarehouseInInfoByIds(ids);
    }

    /**
     * 删除入库清单信息
     *
     * @param id 入库清单主键
     * @return 结果
     */
    @Override
    public int deleteWarehouseInInfoById(Long id) {
        return warehouseInInfoMapper.deleteWarehouseInInfoById(id);
    }
}
